/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: Activity.java
 * Author:   15050536
 * Date:     2017年3月24日 下午6:12:03
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.member.dto;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * 标签实体<br>
 *
 * @author 14060886 祝翔龙
 */
@Entity(name = "mem_labels")
public class Label implements Serializable {

    /**
     */
    private static final long serialVersionUID = -6535525189750251476L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 标签名称
     */
    private String labelName;

    /**
     * 标签类型 0必填 1选填
     */
    private String labelType;

    /**
     * 父标签id
     */
    private Long parentId;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 渠道 0全渠道 1店+渠道 2POS渠道
     */
    private String channel;

    private Collection<Label> subLabels;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "label_name")
    public String getLabelName() {
        return labelName;
    }

    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }

    @Column(name = "label_type")
    public String getLabelType() {
        return labelType;
    }

    public void setLabelType(String labelType) {
        this.labelType = labelType;
    }

    @Column(name = "parent_id")
    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Column(name = "create_user")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Column(name = "create_time")
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Collection<Label> getSubLabels() {
        return subLabels;
    }

    public void setSubLabels(Collection<Label> subLabels) {
        this.subLabels = subLabels;
    }

    @Column(name = "channel")
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
